package com.erp.module.zhiLiang.xingJianZhiLiang

import android.app.Activity
import androidx.appcompat.app.AlertDialog
import android.content.Intent
import android.provider.MediaStore
import android.util.Log
import android.view.KeyEvent
import android.view.View
import android.widget.AdapterView
import com.erp.activity.BaseActivity
import com.erp.activity.DanjianivActivity
import com.erp.myAdapter.ArrayAdapter
import com.erp.myAdapter.BuzhouKAdapter
import com.erp.myAdapter.GvphotoAdapter
import com.erp.bean.ZhiLiangBean
import com.erp.CaptureActivity
import com.erp.mclass.UnCeHandler
import com.erp.permission.PermissionListener
import com.erp.R
import com.erp.activity.MainKActivity
import com.erp.bean.PhotoBean
import com.erp.mclass.QuanXian
import com.erp.util.Dialogutil
import com.erp.util.Myutil
import com.erp.util.PermissionUtils
import com.erp.module.zhiLiang.FragmentZhiLiang
import kotlinx.android.synthetic.main.activity_xingjian_zhiliang.*
import kotlinx.android.synthetic.main.header_knoya.*
import kotlin.collections.ArrayList

/**
 * Created by Administrator on 2018/4/4/004.
 * 作者：刘洋
 */

class XingJianZhiLiangActivity : BaseActivity(), AdapterView.OnItemClickListener, AdapterView.OnItemLongClickListener, XjZhiLiangKView, View.OnClickListener {
    lateinit var zhiliangbean: ZhiLiangBean
    private var isxiugai = false
    private var isshanchu = false
    lateinit var zhiLiangphotoAdapter: GvphotoAdapter
    private var rigcode = 1
    lateinit var deletephoto: MutableList<PhotoBean>
    lateinit var updatedialog: AlertDialog
    lateinit var zhiliangid: List<String>
    lateinit var zhiliangname: List<String>
    lateinit var gonghao: List<String>
    lateinit var gonghaoname: List<String>
    lateinit var xjZhiLiangKP: XJZhiLiangKP
    lateinit var buzhouAdapter : BuzhouKAdapter
    lateinit var jitainame: MutableList<String>
    lateinit var miaoshuname: MutableList<String>
    lateinit var fanganname: MutableList<String>
    private val a = "XingJianZhiLiangActivity"
    override fun getLayoutId(): Int {
        activityname = a
        return R.layout.activity_xingjian_zhiliang
    }

    override fun initCreate() {
        initView()
    }

    private fun initView() {
        UnCeHandler.buzhou="initView"
        zhiliangname = ArrayList()
        gonghaoname = ArrayList()
        zhiliangid = ArrayList()
        gonghao = ArrayList()

        xuanzeshuju()

        deletephoto = ArrayList<PhotoBean>()
        val code = intent.getIntExtra("code", 0)
        isxiugai = sp.getBoolean("isXiuGaiWuLiaoZhiLiang", isxiugai)
        isshanchu = sp.getBoolean("isDeleteWuLiaoZhiLiang", isshanchu)
        iv_header_left.visibility = View.VISIBLE
        tv_header_title.visibility = View.VISIBLE
        tv_header_title.text = "板材质量问题"
        zhiliangbean = ZhiLiangBean()
        xjZhiLiangKP = IXJWuLiaoZhiLiangKp(this, this, zhiliangbean, code)
        zhiLiangphotoAdapter = GvphotoAdapter(zhiliangbean.listphoto, this)
        GvZhiLiangPhoto.onItemClickListener = this
        GvZhiLiangPhoto.adapter = zhiLiangphotoAdapter
        GvZhiLiangPhoto.onItemLongClickListener = this
        tv_header_right.setOnClickListener(this)
        iv_header_left.setOnClickListener(this)
        IvSranTiaoMa.setOnClickListener(this)
        TvTimeX.setOnClickListener(this)
        if (code == 1) {
            llChongFu.visibility = View.VISIBLE
            CbChongfu.setOnCheckedChangeListener { buttonView, isChecked ->
                if (isChecked) {
                    xjZhiLiangKP.chongFuShaungChuan(true)
                } else {
                    xjZhiLiangKP.chongFuShaungChuan(false)
                }
            }
        }
        val chulis = arrayOf("", "修复", "补板")
        val adapter = ArrayAdapter(this, R.layout.lv_sp_tvitem, chulis)
        SpChuLi.adapter = adapter
        AtWenTi.setOnClickListener { AtWenTi.showDropDown() }
        AtGongHao.setOnClickListener { AtGongHao.showDropDown() }
        xjZhiLiangKP.MoShi()
        xjZhiLiangKP.getWuLiaoZhiLiangDaiMa()
        xjZhiLiangKP.getGongHaoLieBiao()

        AtJiHao.setOnClickListener { AtJiHao.showDropDown() }
        AtMiaoShu.setOnClickListener { AtMiaoShu.showDropDown() }
        AtFangAn.setOnClickListener { AtFangAn.showDropDown() }
        xjZhiLiangKP.getmaterial_quality_params()
        Btshouhuo.setOnClickListener(this)
        if(zhiliangbean.consignee_time == "" && zhiliangbean.handle_way == "补板"){
            if(QuanXian.isConsigneeMaterialQuality){
                Btshouhuo.visibility = View.VISIBLE;
            }
        }
    }

    override fun onClick(v: View) {
        UnCeHandler.buzhou="onClick"
        when (v) {
            iv_header_left -> {
                addclean()
                finish()
            }
            IvSranTiaoMa -> {
                PermissionUtils.issaomiao(this@XingJianZhiLiangActivity, object : PermissionListener {
                    override fun onSucceed(requestCode: Int, grantPermissions: List<String>) {
                        val intent = Intent()
                        intent.setClass(this@XingJianZhiLiangActivity, CaptureActivity::class.java)
                        intent.flags = Intent.FLAG_ACTIVITY_CLEAR_TOP
                        startActivityForResult(intent, 1)
                    }

                    override fun onFailed(requestCode: Int, deniedPermissions: List<String>) {
                        Myutil.MyTost("没有权限，无法扫描")
                    }
                })
            }
            TvTimeX -> {
                Dialogutil.showBottoPopupWindow(TvTimeX, "选择问题发生时间", TvTimeX.text.toString(), this@XingJianZhiLiangActivity)
            }
            tv_header_right -> {
                if (rigcode == 1) {
                    xjZhiLiangKP.MoShi()
                } else {
                    val zhiLiangBeann = ZhiLiangBean()
                    zhiLiangBeann.id = zhiliangbean.id
                    zhiLiangBeann.listphoto = zhiliangbean.listphoto
                    zhiLiangBeann.mcode = EtTiaoMa.text.toString()
                    zhiLiangBeann.occurrence_time = Myutil.dateToStamp(TvTimeX.text.toString())
                    zhiLiangBeann.description = AtMiaoShu.text.toString()
                    zhiLiangBeann.dnum = AtJiHao.text.toString()
                    //                    zhiLiangBeann.qi_id = qi_id + ""
                    zhiLiangBeann.handle_way = SpChuLi.selectedItem.toString()
                    zhiLiangBeann.solution = AtFangAn.text.toString()
                    zhiLiangBeann.count=EtCount.text.toString()
                    zhiLiangBeann.pname=EtBaohao.text.toString()
                    if (!zhiliangname.contains(AtWenTi.text.toString())) {
                        Myutil.MyTost("输入问题代码不存在,不能上传")
                        return
                    }
                    if (!gonghaoname.contains(AtGongHao.text.toString())) {
                        Myutil.MyTost("输入问的工号不存在,不能上传")
                        return
                    }
                    if (zhiLiangBeann.mcode == "") {
                        Myutil.MyTost("条形码必须填写")
                        return
                    }
                    if (zhiLiangBeann.occurrence_time == "") {
                        Myutil.MyTost("发生时间必须填写")
                        return
                    }

                    for (i in zhiliangname.indices) {
                        if (zhiliangname[i] == AtWenTi.text.toString().trim { it <= ' ' }) {
                            zhiLiangBeann.qi_id = zhiliangid[i]
                        }
                    }
                    for (i in gonghaoname.indices) {
                        if (gonghaoname[i] == AtGongHao.text.toString().trim { it <= ' ' }) {
                            zhiLiangBeann.work_number = gonghao[i]
                        }
                    }
                    if (zhiLiangBeann.qi_id == "") {
                        Myutil.MyTost("质量问题必须填写")
                        return
                    }
                    if (zhiLiangBeann.count == "") {
                        Myutil.MyTost("质量数量必须填写")
                        return
                    }
                    if (zhiLiangBeann.count == "0") {
                        Myutil.MyTost("质量数量不能为0")
                        return
                    }
                    if (zhiLiangBeann.work_number == "0") {
                        Myutil.MyTost("责任工号必须填写")
                        return
                    }
                    if(zhiLiangBeann.pname == ""){
                        Myutil.MyTost("包号必须填写")
                        return
                    }
                    zhiLiangBeann.handle_way = SpChuLi.selectedItem.toString()

                    updatedialog = Myutil.showupdatedialog(this@XingJianZhiLiangActivity, "正在上传", false)
                    xjZhiLiangKP.putWuLiaoZHiLiang(zhiLiangBeann, deletephoto)
                }
            }
            Btshouhuo -> {
                updatedialog = Myutil.showupdatedialog(this@XingJianZhiLiangActivity, "正在确认收货", false)
                xjZhiLiangKP.querenShouhuo()
            }
        }
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        UnCeHandler.buzhou="onActivityResult"
        super.onActivityResult(requestCode, resultCode, data)
        if (data == null) {
            return
        }
        if (resultCode == Activity.RESULT_OK) {
            when (requestCode) {
                1 -> {
                    val bundle = data.extras
                    val tiaoma = bundle!!.get("result")!!.toString()
                    EtTiaoMa.setText(tiaoma)
                }
                99 -> {
                    val selectedImage = data.data
                    val filePathColumns = arrayOf(MediaStore.Images.Media.DATA)
                    val c = selectedImage?.let { contentResolver.query(it, filePathColumns, null, null, null) }
                    c!!.moveToFirst()
                    val columnIndex = c.getColumnIndex(filePathColumns[0])
                    val imagePath = c.getString(columnIndex)
                    addphoto(imagePath)
                }
                100 -> {
                    val name = data.getStringExtra("dir")
                    addphoto(name)
                }
            }
        }
    }

    private fun addphoto(name: String) {
        UnCeHandler.buzhou="addphoto"
        val photo = PhotoBean()
        photo.uri = name
        zhiliangbean.listphoto.add(photo)
        zhiLiangphotoAdapter.notifyDataSetChanged()
    }

    override fun onItemClick(parent: AdapterView<*>, view: View, position: Int, id: Long) {
        UnCeHandler.buzhou="onItemClick"
        if (position == zhiliangbean.listphoto.size) {
            Dialogutil.photodialog(this@XingJianZhiLiangActivity, null)
        } else {
            val intent = Intent(this@XingJianZhiLiangActivity, DanjianivActivity::class.java)
            intent.putExtra("url", zhiliangbean.listphoto[position].uri)
            startActivity(intent)
        }
    }

    override fun onItemLongClick(parent: AdapterView<*>, view: View, position: Int, id: Long): Boolean {
        UnCeHandler.buzhou="onItemLongClick"
        if (rigcode == 2) {
            val dialog = AlertDialog.Builder(this@XingJianZhiLiangActivity)
            dialog.setTitle("提示")
            dialog.setMessage("确定要删除这个照片")
            dialog.setPositiveButton("确定") { dialog, which ->
                deletephoto.add(zhiliangbean.listphoto[position])
                zhiliangbean.listphoto.remove(zhiliangbean.listphoto[position])
                zhiLiangphotoAdapter.notifyDataSetChanged()
            }
            dialog.setNegativeButton("取消") { dialog, which -> dialog.dismiss() }
            dialog.show()
        }
        return true
    }



    override fun ChaKan() {
        UnCeHandler.buzhou="ChaKan"
        rigcode = 1
        zhiliangbean = FragmentZhiLiang.zhiLiangBean
        xjZhiLiangKP.setZhiLiangBean(zhiliangbean)
        zhiLiangphotoAdapter.notifyA(zhiliangbean.listphoto)
        Log.d("TAAAG", "zhil=" + zhiliangbean.toString())
        Myutil.settv(zhiliangbean.mcode, TvTiaoMa)
        Myutil.setet(zhiliangbean.mcode, EtTiaoMa)
        Myutil.settv(zhiliangbean.work_number, TvGongHao)
        Myutil.settv(zhiliangbean.qi_name, TvWenTi)
        Myutil.settv(zhiliangbean.description, TvMiaoShu)
        Myutil.setet(zhiliangbean.description, AtMiaoShu)
        Myutil.settv(zhiliangbean.handle_way, TvChuLi)
        Myutil.settv(zhiliangbean.dnum, TvJiHao)
        Myutil.setet(zhiliangbean.dnum, AtJiHao)
        Myutil.settv(zhiliangbean.solution, TvFangAn)
        Myutil.setet(zhiliangbean.solution, AtFangAn)
        Myutil.setet(zhiliangbean.count, EtCount)
        Myutil.settv(zhiliangbean.count, TvCount)
//        Myutil.settv(zhiliangbean.mb_batch_name, TvGaibu)
        Myutil.setet(zhiliangbean.pname,EtBaohao)
        Myutil.settv(zhiliangbean.pname,TvBaohao)
        TvTimeT.text = Myutil.getdata(zhiliangbean.occurrence_time)
        TvTimeX.text = Myutil.getdata(zhiliangbean.occurrence_time)
        TvTimeX.visibility = View.GONE
        AtWenTi.visibility = View.GONE
        AtGongHao.visibility = View.GONE
        SpChuLi.visibility = View.GONE
        AtFangAn.visibility = View.GONE
        AtJiHao.visibility = View.GONE
        AtMiaoShu.visibility = View.GONE
        EtCount.visibility=View.GONE
        EtBaohao.visibility=View.GONE
        if (isxiugai) {
            tv_header_right.visibility = View.VISIBLE
            tv_header_right.text = "修改"
        } else {
            tv_header_right.visibility = View.GONE
        }
        if (zhiliangbean.handle_way == "") {
            SpChuLi.setSelection(0)
        } else if (zhiliangbean.handle_way == "修复") {
            SpChuLi.setSelection(1)
        } else if (zhiliangbean.handle_way == "补板") {
            SpChuLi.setSelection(2)
//            llBubanGangwei.visibility=View.VISIBLE
//            llGaibuhao.visibility=View.VISIBLE
        }
        buzhouAdapter= BuzhouKAdapter(this, zhiliangbean.listbuzhou)
//        lvBuBanGangWei.adapter=buzhouAdapter
    }

    override fun XiuGai() {
        UnCeHandler.buzhou="XiuGai"
        rigcode = 2
        if(MainKActivity.uid == zhiliangbean.creator_uid || zhiliangbean.creator_uid == ""){
            TvMiaoShu.visibility = View.GONE
            TvGongHao.visibility = View.GONE
            TvTiaoMa.visibility = View.GONE
            TvWenTi.visibility = View.GONE
            TvChuLi.visibility = View.GONE
            TvJiHao.visibility = View.GONE
            TvTimeT.visibility = View.GONE
            TvCount.visibility=View.GONE
            TvBaohao.visibility=View.GONE
            EtTiaoMa.visibility = View.VISIBLE
            AtMiaoShu.visibility = View.VISIBLE
            AtJiHao.visibility = View.VISIBLE
            AtFangAn.visibility = View.VISIBLE
            SpChuLi.visibility = View.VISIBLE
            EtCount.visibility=View.VISIBLE
            IvSranTiaoMa.visibility = View.VISIBLE
            tv_header_right.visibility = View.VISIBLE
            TvTimeX.visibility = View.VISIBLE
            AtWenTi.visibility = View.VISIBLE
            AtGongHao.visibility = View.VISIBLE
            EtBaohao.visibility=View.VISIBLE
        }
        tv_header_right.text = "保存"
        if (sp.getBoolean("isXiuGaiWuLiaoZhiLiangT", false)) {
            TvFangAn.visibility = View.GONE
            AtFangAn.visibility = View.VISIBLE
            TvChuLi.visibility = View.GONE
            SpChuLi.visibility = View.VISIBLE
        } else {
            TvFangAn.visibility = View.VISIBLE
            AtFangAn.visibility = View.GONE
            TvChuLi.visibility = View.VISIBLE
            SpChuLi.visibility = View.GONE
        }
        zhiLiangphotoAdapter.isadd(true)
        zhiLiangphotoAdapter.notifyDataSetChanged()
    }

    override fun getWuLiaoZhiLiangDaiMaOk(zhiliangid: MutableList<String>, zhiliangname: MutableList<String>) {
        UnCeHandler.buzhou="getWuLiaoZhiLiangDaiMaOk"
        this.zhiliangid = zhiliangid
        this.zhiliangname = zhiliangname
        val av = ArrayAdapter(this@XingJianZhiLiangActivity, R.layout.simple_at_item, zhiliangname)
        AtWenTi.setAdapter(av)
        if (zhiliangbean.qi_id != "") {
            for (i in zhiliangid.indices) {
                if (zhiliangid[i] == zhiliangbean.qi_id) {
                    AtWenTi.setText(zhiliangname[i])
                }
            }
        }
    }

    override fun getWuLiaoZhiLiangDaiMaNo(throwable: String) {
        Log.d("TAAAG", "throwable=$throwable")
    }

    override fun getGongHaoLieBiaoOk(gonghao: MutableList<String>, gonghaoname: MutableList<String>) {
        UnCeHandler.buzhou="getGongHaoLieBiaoOk"
        this.gonghao = gonghao
        this.gonghaoname = gonghaoname
        val av = ArrayAdapter(this@XingJianZhiLiangActivity, android.R.layout.simple_dropdown_item_1line, gonghaoname)
        AtGongHao.setAdapter(av)
        if (zhiliangbean.work_number != "") {
            for (i in gonghao.indices) {
                if (gonghao[i] == zhiliangbean.work_number) {
                    AtGongHao.setText(gonghaoname[i])
                }
            }
        }
    }

    override fun getGongHaoLieBiaoNo(throwble: String) {
        Log.d("TAAAG", "throwable=$throwble")
    }

    override fun putWuLiaoZhiLiangshujuOk() {
        UnCeHandler.buzhou="putWuLiaoZhiLiangshujuOk"
        updatedialog.dismiss()
        val i = Intent()
        i.putExtra("isxing", false)
        setResult(Activity.RESULT_OK, i)
        finish()
    }

    override fun addWuLiaoZhiLiangshujuOk() {
        UnCeHandler.buzhou="addWuLiaoZhiLiangshujuOk"
        updatedialog.dismiss()
        val i = Intent()
        i.putExtra("isxing", true)
        setResult(Activity.RESULT_OK, i)
        finish()
    }

    override fun putWuLiaoZhiLiangshujuNo(throwable: String) {
        UnCeHandler.buzhou="putWuLiaoZhiLiangshujuNo"
        updatedialog.dismiss()
    }

    override fun onKeyDown(keyCode: Int, event: KeyEvent): Boolean {
        UnCeHandler.buzhou="onKeyDown"
        if (keyCode == 4) {
            if (rigcode == 2) {
                val dialog = AlertDialog.Builder(this@XingJianZhiLiangActivity)
                dialog.setTitle("提示")
                dialog.setMessage("确定要取消上传")
                dialog.setPositiveButton("确定") { dialog, which ->
                    addclean()
                    finish() }
                dialog.setNegativeButton("取消") { dialog, which -> dialog.dismiss() }
                dialog.show()
            }
        }
        return super.onKeyDown(keyCode, event)
    }
    fun addclean() {
        UnCeHandler.buzhou = "addclean"
        for (i in zhiliangbean.listphoto.size-1 downTo 1) {
            if (zhiliangbean.listphoto[i].fid == "") {
                zhiliangbean.listphoto.removeAt(i)
            }
        }
    }

    override fun getmaterial_quality_paramsOk(jitainame: MutableList<String>, miaoshuname: MutableList<String>, fanganname: MutableList<String>) {
        this.jitainame = jitainame
        this.miaoshuname = miaoshuname
        this.fanganname = fanganname
        val avjihao = ArrayAdapter(this@XingJianZhiLiangActivity, R.layout.simple_at_item, jitainame)
        AtJiHao.setAdapter(avjihao)

        val avmiaoshu = ArrayAdapter(this@XingJianZhiLiangActivity, R.layout.simple_at_item, miaoshuname)
        AtMiaoShu.setAdapter(avmiaoshu)

        val avfangan = ArrayAdapter(this@XingJianZhiLiangActivity, R.layout.simple_at_item, fanganname)
        AtFangAn.setAdapter(avfangan)
    }

    override fun querenShouhuoOk() {
        updatedialog.dismiss()
        val i = Intent()
        i.putExtra("isxing", true)
        setResult(Activity.RESULT_OK, i)
        finish()
    }

    override fun querenShouhuoNo() {
        updatedialog.dismiss()
    }

    fun xuanzeshuju(){
        jitainame = arrayListOf("","401雕刻连体机","401雕刻机1","401雕刻机2","401电子锯","401砂边机1","401砂边机2","401砂边机3","401手工打磨","401异形砂光机","401门铰孔","401钉花","401扫描","401喷胶","401吸塑机1",
                "401吸塑机2","401吸塑机3","401吸塑机4","401修边","401清洗","401装玻璃","401装拉手","401装拉直器","401描银","401分包1","401分包2","401包装1","401包装2","401包装3","401包装4","401接包",
                "402封边1A","402封边2A","402封边3A","402封边4A","402封边5A","402封边6A","402封边7A","402封边8A","402排钻1A","402排钻2A","402排钻3A","402排钻4A","402排钻5A","402排钻6A","402排钻7A","402排钻8A",
                "402扫描A","402拼装A","402GF排钻A","402GF清洗A","402GF扫描A","402GF拼装A","402柜体包装A","402GF包装A","402组盘A","402封边1B","402封边2B","402封边3B","402封边4B","402封边5B","402封边6B","402封边7B","402封边8B",
                "402排钻1B","402排钻2B","402排钻3B","402排钻4B","402排钻5B","402排钻6B","402排钻7B","402排钻8B","402扫描B","402拼装B","402GF排钻B","402GF清洗B","402GF扫描B","402GF拼装B","402柜体包装B","402GF包装B","402组盘B",
                "403封边1","403封边2","403封边3","403封边4","403封边5","403封边6","403封边7","403封边8","403封边9","403封边10","403排钻1","403排钻2","403排钻3","403排钻4","403排钻5","403排钻6","403排钻7","403扫描","403拼装",
                "403GF排钻","403GF清洗","403GF扫描","403GF拼装","403柜体包装","403GF包装","403组盘","602封边1","602封边2","602封边3","602封边4","602封边5","602封边6","602封边7","602封边8","602排钻1","602排钻2","602排钻3",
                "602排钻4","602排钻5","602排钻6","602扫描1","602扫描2","602拼装","602GF排钻","602GF排钻","602GF清洗","602GF扫描","602GF拼装","602柜体包装","602GF包装","602组盘","501封边1","501封边2","501封边3","501封边4",
                "501封边5","501开槽","501房门（技术工艺）","501房门（加厚）","501房门（工艺加工）","501房门（清洗拼装包装）","501工艺加厚","501工艺加工1","501工艺加工2","501工艺裁切1","501工艺裁切2","501工艺裁切3",
                "501排钻1","501排钻2","501排钻3","501清洗1","501清洗2","501拼装1","501拼装2","501包装1","501包装2","501包装3","502自动封边1","502自动封边2","502自动封边3","502自动封边4","502自动封边5","502自动封边6","502自动封边7",
                "502自动封边8","502自动封边9","502手动封边1","502手动封边2","502板件工艺1","502板件工艺2","502门铰孔1","502门铰孔2","502门铰孔3","502门铰孔4","502木框门1","502木框门2","502木框门飞边","502排钻1","502排钻2","502排钻3",
                "502排钻4","502清洗抽屉1","502清洗抽屉2","502清洗平开门1","502清洗平开门2","502清洗异形1","502清洗异形2","502清洗异形3","502拼装抽屉1","502拼装抽屉2","502拼装门类1","502拼装门类2","502拼装异形1","502拼装异形2",
                "502拼装背板1","502拼装背板2","502包装抽屉1","502包装抽屉2","502包装门类1","502包装门类2","502包装异形1","502包装异形2","502包装背板1","502包装背板2","503自动封边1","503自动封边2","503自动封边3","503自动封边4",
                "503自动封边4","503自动封边5","503自动封边6","503自动封边7","503自动封边8","503手动封边1","503手动封边2","503板件工艺1","503板件工艺2","503门铰孔1","503门铰孔2","503排钻1","503排钻2","503排钻3","503排钻4",
                "503清洗抽屉1","503清洗抽屉2","503清洗平开门1","503清洗平开门2","503清洗异形1","503清洗异形2","503清洗C单","03拼装抽屉1","03拼装抽屉2","503拼装门类1","503拼装门类2","503拼装异形1","503拼装异形2","503拼装背板1",
                "503拼装背板2","503拼装C单1","503拼装C单2","503包装抽屉1","503包装抽屉2","503包装门类1","503包装门类2","503包装异形1","503包装异形2","503包装背板1","503包装背板2","503包装C单1","503包装C单2","402开料4A","402开料5A",
                "402开料6A","402开料7A","402开料8A","402开料9A","402开料10A","402开料11A","402开料4B","402开料5B","402开料6B","402开料7B","402开料8B","402开料9B","402开料10B","402开料11B","402雕刻2","403开料23","403开料24","403开料25",
                "403开料26","403开料27","403开料28","403开料29","403开料30","403雕刻5","501开料1","501开料2","501开料3","501雕刻1","502开料12A","502开料13A","502开料14A","502开料15A","502开料12B","502开料13B","502开料14B","502开料15B",
                "502雕刻3","502雕刻4","503开料31","503开料32","503开料33","503开料34","503雕刻6","503雕刻7","602开料16","602开料17","602开料18","602开料19","602开料20","602开料21","602开料22")
        miaoshuname = arrayListOf("员工操作","设备故障","原材料","工艺技术","检测异常")
        fanganname = arrayListOf("员工技能培训","设备故障检修","原材料商改善","修订技术参数","更改加工工艺","增加检测频次","校准检测工具","修订质量标准")
    }
}
